﻿using HKTools;
using QFramework;
using UnityEngine;

public class CMD_FPS_FixTheCamera : AbstractCommand
{
    Vector3 posTarget;
    Transform lookAtTarget;

    public CMD_FPS_FixTheCamera(Vector3 posTarget, Transform lookAtTarget = null)
    {
        this.posTarget = posTarget;
        this.lookAtTarget = lookAtTarget;
    }

    protected override void OnExecute()
    {
        this.GetSystem<IHK_FirstPersonCamSystem>().FirstPerson.FixTheCamera(posTarget, lookAtTarget);
    }
}
